home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 1 / Cream of the Crop 1.iso / PROGRAM / DMAKE38C.ARJ / SETVBUF.C < prev    next >
C/C++ Source or Header  |  1992-01-23  |  2KB  |  50 lines

  1. /* RCS      -- $Header: /u2/dvadura/src/generic/dmake/src/unix/bsd43/setvbuf.c,v 1.1 1992/01/24 03:28:10 dvadura Exp $
  2. -- SYNOPSIS -- setvbuf for BSD
  3. -- 
  4. -- DESCRIPTION
  5. --     A sysv call, standard BSD doesn't have this.
  6. --
  7. -- AUTHOR
  8. --      Dennis Vadura, dvadura@watdragon.uwaterloo.ca
  9. --      CS DEPT, University of Waterloo, Waterloo, Ont., Canada
  10. --
  11. -- COPYRIGHT
  12. --      Copyright (c) 1990 by Dennis Vadura.  All rights reserved.
  13. -- 
  14. --      This program is free software; you can redistribute it and/or
  15. --      modify it under the terms of the GNU General Public License
  16. --      (version 1), as published by the Free Software Foundation, and
  17. --      found in the file 'LICENSE' included with this distribution.
  18. -- 
  19. --      This program is distributed in the hope that it will be useful,
  20. --      but WITHOUT ANY WARRANTY; without even the implied warrant of
  21. --      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  22. --      GNU General Public License for more details.
  23. -- 
  24. --      You should have received a copy of the GNU General Public License
  25. --      along with this program;  if not, write to the Free Software
  26. --      Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  27. --
  28. -- LOG
  29. --     $Log: setvbuf.c,v $
  30.  * Revision 1.1  1992/01/24  03:28:10  dvadura
  31.  * dmake Version 3.8, Initial revision
  32.  *
  33. */
  34.  
  35. #include <stdio.h>
  36.  
  37. setvbuf(fp, bp, type, len_unused)
  38. FILE*    fp;
  39. char*    bp;
  40. int    type;
  41. int    len_unused;
  42. {
  43.    switch (type) {
  44.       case _IOLBF: setlinebuf(fp);   return;
  45.       case _IONBF: setbuf(fp, NULL); return;
  46.       default:     setbuf(fp, bp);   return;
  47.    }
  48. }
  49.  
  50.